projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dea1048
)
xm: Use 'vifname' config option to construct a qemu tap name.
author
Keir Fraser
<keir.fraser@citrix.com>
Fri, 16 Oct 2009 07:36:22 +0000
(08:36 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Fri, 16 Oct 2009 07:36:22 +0000
(08:36 +0100)
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
tools/python/xen/xend/image.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xend/image.py
b/tools/python/xen/xend/image.py
index faf12eabcee7f8bd14538b6c00ada29c47c9c4c1..d6127bfb932949068b1c5a3afa148b9736c03f08 100644
(file)
--- a/
tools/python/xen/xend/image.py
+++ b/
tools/python/xen/xend/image.py
@@
-873,9
+873,14
@@
class HVMImageHandler(ImageHandler):
ret.append("-net")
ret.append("nic,vlan=%d,macaddr=%s,model=%s" %
(nics, mac, model))
+ vifname = devinfo.get('vifname')
+ if vifname:
+ vifname = "tap-" + vifname
+ else:
+ vifname = "tap%d.%d" % (self.vm.getDomid(), nics-1)
ret.append("-net")
- ret.append("tap,vlan=%d,ifname=
tap%d.%d
,bridge=%s" %
- (nics,
self.vm.getDomid(), nics-1
, bridge))
+ ret.append("tap,vlan=%d,ifname=
%s
,bridge=%s" %
+ (nics,
vifname
, bridge))
if nics == 0:
ret.append("-net")